package cn.lesaas.esb.poc.test;

import java.io.InputStream;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;

public class RespProcessor implements Processor{

	@Override
	public void process(Exchange exchange) throws Exception {
		final InputStream resource = getClass().getClassLoader().getResourceAsStream("delayResp.xml");
		final String resp = exchange.getContext().getTypeConverter().mandatoryConvertTo(String.class, resource);
		exchange.getIn().setBody(resp);
	}

}
